package com.richie696.spring;

import com.richie696.domain.User;
import com.richie696.mapper.UserMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath*:applicationContext.xml")
public class SpringTest {

    @Autowired
    private UserMapper userMapper;

    @Test
    public void findAllTest() {
        List<User> list = userMapper.selectList(null);
        list.forEach(System.err::println);
    }
}
